<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Bomberman:  Fichier source de /home/ph3w/Bureau/lif7-bomberman/moteur_sfml.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Généré par Doxygen 1.7.1 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div class="header">
  <div class="headertitle">
<h1>/home/ph3w/Bureau/lif7-bomberman/moteur_sfml.h</h1>  </div>
</div>
<div class="contents">
<a href="moteur__sfml_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef MOTEUR_SDL_h</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define MOTEUR_SDL_h</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="config_8h.html">config.h</a>&quot;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="options_8h.html">options.h</a>&quot;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<a class="code" href="partie_8h.html">partie.h</a>&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="outils_8h.html">outils.h</a>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;math.h&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span><span class="comment">// Pour strlen()</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;SFML/Window.hpp&gt;</span>
<a name="l00011"></a>00011 <span class="comment"></span>
<a name="l00012"></a>00012 <span class="comment">/*!</span>
<a name="l00013"></a>00013 <span class="comment">* @class moteur_sfml</span>
<a name="l00014"></a>00014 <span class="comment">* @brief Gère l&#39;affichage via le moteur graphique SFML</span>
<a name="l00015"></a>00015 <span class="comment">*/</span>
<a name="l00016"></a>00016 
<a name="l00017"></a><a class="code" href="classmoteur__sfml.html">00017</a> <span class="keyword">class </span><a class="code" href="classmoteur__sfml.html" title="Gère l&amp;#39;affichage via le moteur graphique SFML.">moteur_sfml</a>
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019     <span class="keyword">private</span>:
<a name="l00020"></a>00020         <span class="keyword">enum</span> {
<a name="l00021"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819afe553334e398e7a92913c50a8c9fa1b9">00021</a>             <a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819afe553334e398e7a92913c50a8c9fa1b9">vide</a>=0,
<a name="l00022"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a2b36d2621010ec719f52a8ec34856e11">00022</a>             mur_destructible,
<a name="l00023"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a3c4ff39ab81f873d655e023df8ec834a">00023</a>             mur_indestructible,
<a name="l00024"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a6b6c94e70dbba1c9b42cd13f9c91702a">00024</a>             joueur1_haut,
<a name="l00025"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ac1f08542f4a93a8a2f5c64cbd26530b5">00025</a>             joueur1_bas,
<a name="l00026"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a9f8c36e8b4df978761a6060e22cdfd93">00026</a>             joueur1_gauche,
<a name="l00027"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a379c6313a56ebe3a46bbd631141c07ae">00027</a>             joueur1_droite,
<a name="l00028"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819aef50419d628fecb73cd488445337c347">00028</a>             joueur2_haut,
<a name="l00029"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a69130c45a067f3fe3969cf62c468365d">00029</a>             joueur2_bas,
<a name="l00030"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a1125189d665cb5310764351e3c772217">00030</a>             joueur2_gauche,
<a name="l00031"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819aa5d0a1f6b765753febb59550f8a1581d">00031</a>             joueur2_droite,
<a name="l00032"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ad7ee121658dc51ae8ee96c7434834caa">00032</a>             joueur3_haut,
<a name="l00033"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819af2773e1bb6f8573c8976e732db961840">00033</a>             joueur3_bas,
<a name="l00034"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ad656d9ce6205f47c0220f8999d6fa6c6">00034</a>             joueur3_gauche,
<a name="l00035"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819afa72465cd11e4633c711eb08c50d30e5">00035</a>             joueur3_droite,
<a name="l00036"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ac1e88e633cf81e2c137819c4547f20d9">00036</a>             joueur4_haut,
<a name="l00037"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819aee8d7cf2fe05116b6cc4fca8d9caabca">00037</a>             joueur4_bas,
<a name="l00038"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819aa0af7d152687f214df9f9f1d9e4ade7d">00038</a>             joueur4_gauche,
<a name="l00039"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ab7d49368ff6d1cd4b40074c3223dd654">00039</a>             joueur4_droite,
<a name="l00040"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a225d5f7291e21a3edc3e1a5550e0267f">00040</a>             flamme_origine,
<a name="l00041"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a5c2fef4fa5ccf5f41a11905ab51230c9">00041</a>             flamme_horizontal,
<a name="l00042"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819afe137178dc2e356d46e5c3798c89ec8b">00042</a>             flamme_vertical,
<a name="l00043"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a6300fb6c0a590a99f547381409ce2794">00043</a>             bout_flamme_haut,
<a name="l00044"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ab444465c8be038fae75f8b9c70edbf67">00044</a>             bout_flamme_bas,
<a name="l00045"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ad8f78e115e876056a2cc4751716fe9e1">00045</a>             bout_flamme_gauche,
<a name="l00046"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a22b6fb3e044cc1f5d3ddd543484cec00">00046</a>             bout_flamme_droite,
<a name="l00047"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a96779a83b787d04433299d34967d9324">00047</a>             bombe,
<a name="l00048"></a>00048             <span class="comment">// Bonus</span>
<a name="l00049"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a90b68ed80d1b76a1a8360539ae72e70a">00049</a>             gain_bombe,
<a name="l00050"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819aa3c713835887d9d68a4ec19e4a5149cf">00050</a>             gain_declancheur,
<a name="l00051"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819aae33b3a0a6a058f42ac0c305856df818">00051</a>             gain_puissance_flamme,
<a name="l00052"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819accbc02ad85711f25bfaa891944a0fc51">00052</a>             gain_pousse_bombe,
<a name="l00053"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819a5f95c777792306561a3d75c4e9c3b899">00053</a>             gain_vie,
<a name="l00054"></a>00054 
<a name="l00055"></a><a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ad04ef5ee7124ae147ba626de7ef8913b">00055</a>             <a class="code" href="classmoteur__sfml.html#a3ff99f98149ac2a3f3770453a0665819ad04ef5ee7124ae147ba626de7ef8913b">__nombre_de_decors__</a>
<a name="l00056"></a>00056         };
<a name="l00057"></a>00057 
<a name="l00058"></a>00058     <span class="keyword">private</span>:
<a name="l00059"></a><a class="code" href="classmoteur__sfml.html#afc08f01cd1ae1ffba17e4eb3fb837f9e">00059</a>         sf::Window <a class="code" href="classmoteur__sfml.html#afc08f01cd1ae1ffba17e4eb3fb837f9e">c_App</a>;
<a name="l00060"></a><a class="code" href="classmoteur__sfml.html#a4c1b62209379fff99e24865c09af2164">00060</a>         <span class="keyword">static</span> <a class="code" href="classmoteur__sfml.html" title="Gère l&amp;#39;affichage via le moteur graphique SFML.">moteur_sfml</a>* <a class="code" href="classmoteur__sfml.html#a4c1b62209379fff99e24865c09af2164">c_Instance</a>;
<a name="l00061"></a><a class="code" href="classmoteur__sfml.html#a8a019450d84493d927b4d70393b8340f">00061</a>         sf::Image <a class="code" href="classmoteur__sfml.html#a8a019450d84493d927b4d70393b8340f">c_background</a>;
<a name="l00062"></a><a class="code" href="classmoteur__sfml.html#afe2ed5aa9c0c318f3055e11066d07401">00062</a>         sf::Font <a class="code" href="classmoteur__sfml.html#afe2ed5aa9c0c318f3055e11066d07401">c_policeGeneral</a>;
<a name="l00063"></a><a class="code" href="classmoteur__sfml.html#aceff4b1dc21119871f056e734e8054d4">00063</a>         sf::Image* <a class="code" href="classmoteur__sfml.html#aceff4b1dc21119871f056e734e8054d4">c_Decor</a>;
<a name="l00064"></a><a class="code" href="classmoteur__sfml.html#a3f12bc91b2eeccc764f08a32c50a36c1">00064</a>         <span class="keywordtype">bool</span> <a class="code" href="classmoteur__sfml.html#a3f12bc91b2eeccc764f08a32c50a36c1">c_premierAffichage</a>;
<a name="l00065"></a>00065 
<a name="l00066"></a>00066     <span class="keyword">private</span>:
<a name="l00067"></a>00067         <span class="comment">/*</span>
<a name="l00068"></a>00068 <span class="comment">        SDL_Surface* ecritTexte( const char texte[] );</span>
<a name="l00069"></a>00069 <span class="comment">        SDL_Surface* ecritTexte( const char texte[], const SDL_Color&amp; couleur );</span>
<a name="l00070"></a>00070 <span class="comment">        SDL_Surface* ecritTexte( const char texte[], Uint8 r, Uint8 g, Uint8 b );</span>
<a name="l00071"></a>00071 <span class="comment">        SDL_Surface* ecritTexte( const char texte[], const SDL_Color&amp; couleur, unsigned int taille );</span>
<a name="l00072"></a>00072 <span class="comment">        void joueur_orientation( perso::t_Orientation ori, unsigned char joueur, SDL_Rect* pos ) const;</span>
<a name="l00073"></a>00073 <span class="comment">        */</span>
<a name="l00074"></a>00074         <span class="keyword">static</span> <span class="keywordtype">char</span>* <a class="code" href="classmoteur__sfml.html#aac797169fa9078c8ae02315eb3433dc4" title="Complete le texte avec le caractère _ jusqu&amp;#39;a avoir un texte de longueur 20.">completerMot</a>( <span class="keywordtype">char</span> texte[], <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> taille );
<a name="l00075"></a>00075 
<a name="l00076"></a>00076         <a class="code" href="classmoteur__sfml.html#ad75a96e416de6f74d852dbaf91e8b6c7" title="Initialise la class moteur_sfml.">moteur_sfml</a>();
<a name="l00077"></a>00077 
<a name="l00078"></a>00078     <span class="keyword">public</span>:
<a name="l00079"></a>00079         <span class="keyword">static</span> <a class="code" href="classmoteur__sfml.html" title="Gère l&amp;#39;affichage via le moteur graphique SFML.">moteur_sfml</a>&amp; <a class="code" href="classmoteur__sfml.html#aa5290106520ad011241051d3f60435f1" title="Renvoie l&amp;#39;instance de la class. Si pas d&amp;#39;instance, alors création d&amp;#39;une instance...">getInstance</a>();
<a name="l00080"></a>00080         <a class="code" href="classmoteur__sfml.html#aaab142001dbc3d56136b5bd282ac6475" title="Désinitialise la class moteur_sfml.">~moteur_sfml</a>();
<a name="l00081"></a>00081 
<a name="l00082"></a>00082         <span class="comment">// Fonction d&#39;affichage de menu</span>
<a name="l00083"></a>00083         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classmoteur__sfml.html#afac3f84993acd5a3eab2edf388dd0af0" title="Afficher l&amp;#39;image correspondante suivant le menu où on est.">menu</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> titre[], <span class="keyword">const</span> <span class="keywordtype">char</span> *choix[], <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nb_choix );
<a name="l00084"></a>00084         <span class="keywordtype">void</span> <a class="code" href="classmoteur__sfml.html#a418c3276e0e92dd23ef25da6f9af9b04" title="Menu permettant d&amp;#39;afficher et de modifier la configuration du clavier d&amp;#39;un joueur...">afficherConfigurationClavier</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> joueur );
<a name="l00085"></a>00085         <span class="keywordtype">int</span> <a class="code" href="classmoteur__sfml.html#a924bb726b5d2a413f4da0fe7a00962a2" title="Créer un menu pour récupérer un nombre entré par un utilisateur.">getNombre</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> titre[], <span class="keywordtype">int</span> valeurParDefaut, <span class="keywordtype">int</span> valeurMin, <span class="keywordtype">int</span> valeurMax, <span class="keywordtype">int</span>* valeurRetour );
<a name="l00086"></a>00086         <span class="keywordtype">int</span> <a class="code" href="classmoteur__sfml.html#a8628e69118d8923eff8fad979f791da2" title="Permet d&amp;#39;obtenir du texte.">getTexte</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> titre[], <span class="keywordtype">char</span> texteRetour[21] );
<a name="l00087"></a>00087 
<a name="l00088"></a>00088         <span class="comment">// Modificateur</span>
<a name="l00089"></a><a class="code" href="classmoteur__sfml.html#a07c05115d0ba260cb5df07e310fda5e9">00089</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmoteur__sfml.html#a07c05115d0ba260cb5df07e310fda5e9">forcerRafraichissement</a>() { <a class="code" href="classmoteur__sfml.html#a3f12bc91b2eeccc764f08a32c50a36c1">c_premierAffichage</a> = 1; }
<a name="l00090"></a>00090 
<a name="l00091"></a>00091         <span class="comment">// Autre :: Affichage</span>
<a name="l00092"></a>00092         <span class="keyword">static</span> SYS_CLAVIER <a class="code" href="classmoteur__sfml.html#a2f096be2aa41c3a7045731ff39af1fcf">afficherMapEtEvent</a>( <a class="code" href="classpartie.html" title="Permet de gérer une partie offline ou online ( host et client ).">partie</a>* p );
<a name="l00093"></a>00093 };
<a name="l00094"></a>00094 
<a name="l00095"></a>00095 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Généré le Fri Jan 21 2011 01:21:27 pour Bomberman par&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
